<h1>A minimal CMS. </h1>
<p>
<a href="?slots">slots</a> <a href="?tags">tags</a> <a href="?queryString">queryString</a> <a href="?myrss">myrss</a> <a href="?seed">seed</a> <a href="?anyStrings">anyStrings</a> <a href="?barph">barph</a> <a href="?toc">toc</a> <a href="?mytags">mytags</a> <a href="?topOfPage">topOfPage</a> 
</p>
<pre>
 function penny(config) {
     return penny1("http://" config,ENVIRON["QUERY_STRING"])
 }
 function penny1(slotsFile,query,     \
                 i,wget,sep,values,files,titles,tags,sgat,pages,file,url,content,stem,out,between) {     
     seed()
     wget = "wget -qO - "
     sep="`""`"
     loadSlots(wget slotsFile,sep,values) # get all the short string values
     loadTags(wget values["Tags"],   files,titles,tags,sgat) # get all the page tags
     values["Content"]=""   
     if (query=="sitemap") {
         values["Header"]  = "Contents"
         values["ThisTitle"]=": Contents"
         values["File"]    = "?sitemap" 
         values["Content"] = join2Page(toc(files,titles,tags,sgat),"sitemap")
     } else if (query=="crossIndex") {
         values["Header"]  = "Cross-Index"
         values["ThisTitle"]=": Contents"
         values["File"]    = "?crossIndex" 
         values["Content"] = join2Page(mytags(files,titles,tags,sgat),"crossIndex")
     } else {
         values["Header"]=queryString1(query,tags,files,titles,sgat,pages) # list pages
         if (pages[0] == 0)
             push(pages,values["Default"])
         for(i=1;i&lt;=pages[0];i++) {
             file     = values["File"] = pages[i]
             values["ThisTitle"]=": " titles[file]
             stem     = gensub(/.html/,"","g",file)
             url      = values["Url"]  = values["Site"] "/" file
             content  = content between topOfPage(file,files,titles,tags,sgat)
             between  = "&lt;br clear=all>&lt;hr class=hrsep>"
             content  = content join2Page(fillFrame2String(wget url,sep,values),stem)	     
         } 
         values["Content"] = content
     }
	 values["Content"] = values["Content"] "&lt;br clear=all>"
     fillFrame(wget values["Template"],sep,values)     
 }
 function join2Page(content,stem) {
     return gensub(/&lt;h1>([^&lt;]*)&lt;\/h1>/,
                   "&lt;h1>&lt;a href=\"?"stem"\">\\1&lt;/a>&lt;/h1>",
                   "g",content)
 }
 function slotsPlugIns(string,values,      tmp) {   
     split(string,tmp,";")
     if (tmp[1]=="rss")
         return  "&lt;p id=\"rss\">" myrss(tmp[2],tmp[3],"&lt;p id=\"rss\">")
     if (tmp[1]="any")
         return anyStrings(values[tmp[2]],tmp[3],1)
     barph("(" string ") ???") 
 }
</pre>
<p>
by Tim Menzies
